import React, { Component } from "react";
import { View, Button, Text } from "@tarojs/components";
import { observer, inject } from "mobx-react";
import { LoginCard } from "../../components/login-card";

import "./index.scss";
import { RootStore } from "../../../src/store/root-store";
import Taro from "@tarojs/taro";

interface Index {
  props: {
    rootStore: RootStore;
  };
}

@inject("rootStore")
@observer
class Index extends Component {
  componentWillMount() { }

  componentDidMount() { }

  componentWillUnmount() { }

  componentDidShow() { }

  componentDidHide() { }

  handleLogin = () => {
    Taro.navigateTo({
      url: "/pages/index/index",
    });
  };
  render() {
    return (
      <View className="project-login">

        <LoginCard onLogin={this.handleLogin} />
      </View>
    );
  }
}

export default Index;
